$(document).ready(function() {
	
	//开场第一屏动画开始
	
	$(".section1 .zss_hengline").addClass("helinadd");
	
	$('.zss_sdl p').animate({
		right: '0'
	}, 1500, 'easeOutExpo');;
	
	$(".zss_sdl img").animate({
		left: '0'
	}, 1500, 'easeOutExpo');
		
	
	//开场第一屏动画结束
	
	$(".dowebok").fullpage({

		slidesColor: ['#FFFEF2', 'white', '#FFFEF2', 'white','#FFFEF2', 'white'],

		verticalCentered: true,

		anchors: ['page1', 'page2', 'page3', 'page4', 'page5', 'page6'],

		menu: '#zss_nav',

		//paddingTop: '3rem',

		scrollingSpeed: 600,

		easing: "easeOutCubic",

		navigation: true,

		css3: true,

		afterLoad: function(anchorLink, index) {
			
			if(index == '1') {

				$(".section1 .zss_hengline").addClass("helinadd");
		
				$('.zss_sdl p').animate({
					right: '0'
				}, 1500, 'easeOutExpo');
				
				$(".zss_sdl img").animate({
					left: '0'
				}, 1500, 'easeOutExpo');

			}

			
			if(index == 2) {
				
				$(".section2 .zss_hengline").addClass("helinadd");
				
				$('.section2 .zss_shishtext').delay(100).animate({

					top: '0'

				}, 1200, 'easeOutExpo');
				
				$('.section2 .zss_zg').delay(300).animate({

					top: '0'

				}, 1200, 'easeOutExpo');

			}

			if(index == 3) {
				
				$(".section3 .zss_hengline").addClass("helinadd");
				
				$('.section3 .zss_shishtext').delay(100).animate({

					top: '0'

				}, 1200, 'easeOutExpo');
				
				$('.section3 .zss_zg').delay(300).animate({

					top: '0'

				}, 1200, 'easeOutExpo');
				
				
				
			}

			if(index == 4) {
				
				$(".section4 .zss_hengline").addClass("helinadd");
				
				$('.section4 .zss_shishtext').delay(100).animate({

					top: '0'

				}, 1200, 'easeOutExpo');
				
				$('.section4 .zss_zg').delay(300).animate({

					top: '0'

				}, 1200, 'easeOutExpo');

			}
			
			if(index == 5) {
				
				$(".section5 .zss_hengline").addClass("helinadd");
				
				$('.section5 .zss_shishtext').delay(100).animate({

					top: '0'

				}, 1200, 'easeOutExpo');
				
				$('.section5 .zss_zg').delay(300).animate({

					top: '0'

				}, 1200, 'easeOutExpo');

			}
			
//			if(index == 7) {
//				
//				$(".section7 .zss_hengline").addClass("helinadd");
//				
//				$('.section7 .zss_shishtext').delay(100).animate({
//
//					top: '0'
//
//				}, 1200, 'easeOutExpo');
//				
//				$('.section7 .zss_zg').delay(300).animate({
//
//					top: '0'
//
//				}, 1200, 'easeOutExpo');
//
//			}
			
		},

		onLeave: function(index, direction) {
			
			if(index == '1') {
				
				$(".section1 .zss_hengline").removeClass("helinadd");
		
				$('.zss_sdl p').delay(200).animate({
					right: '200rem'
				}, 1, 'easeOutExpo');;
				
				$(".zss_sdl img").delay(200).animate({
					left: '200rem'
				}, 1, 'easeOutExpo');

			}

			if(index == '2') {
				
				$(".section2 .zss_hengline").removeClass("helinadd");
				
				$('.section2 .zss_shishtext').delay(200).animate({

					top: '100rem'

				}, 1, 'easeOutExpo');
				
				$('.section2 .zss_zg').delay(200).animate({

					top: '100rem'

				}, 1, 'easeOutExpo');
				
					
			}

			if(index == '3') {
				
				$(".section3 .zss_hengline").removeClass("helinadd");
				
				$('.section3 .zss_shishtext').delay(200).animate({

					top: '100rem'

				}, 1, 'easeOutExpo');
				
				$('.section3 .zss_zg').delay(200).animate({

					top: '100rem'

				}, 1, 'easeOutExpo');

			}

			
			if(index == '4') {
				
				$(".section4 .zss_hengline").removeClass("helinadd");
				
				$('.section4 .zss_shishtext').delay(200).animate({

					top: '100rem'

				}, 1, 'easeOutExpo');
				
				$('.section4 .zss_zg').delay(200).animate({

					top: '100rem'

				}, 1, 'easeOutExpo');

			}
			
			if(index == '5') {
				
				$(".section5 .zss_hengline").removeClass("helinadd");
				
				$('.section5 .zss_shishtext').delay(200).animate({

					top: '100rem'

				}, 1, 'easeOutExpo');
				
				$('.section5 .zss_zg').delay(200).animate({

					top: '100rem'

				}, 1, 'easeOutExpo');

			}
			
//			if(index == '7') {
//				
//				$(".section7 .zss_hengline").removeClass("helinadd");
//				
//				$('.section7 .zss_shishtext').delay(200).animate({
//
//					top: '100rem'
//
//				}, 1, 'easeOutExpo');
//				
//				$('.section7 .zss_zg').delay(200).animate({
//
//					top: '100rem'
//
//				}, 1, 'easeOutExpo');
//
//			}
			
		}

	});


	
});